This tool is designed to provide a mathematical aid in optimizing a portfolio of your selection. It is designed to give some salient information on your selected stocks, and then by simulation, identify the minimum variance and optimum portfolios. At default the code runs 100,000 portfolio simulations, but feel free to adjust the ‘num_port’ variable in the ‘PORTFOLIO BUILDING’ chunk to your own desires.
Before we continue a few things to note:
The tool is intended to work with the users own trading narrative, and as such features the same limitations.
The tool uses data from Yahoo Finance, it is a good source for correct tickers for this tool.
The python tool inbuilt for taking inputs is not case sensitive, but an invalid ticker will mean the program does not run as intended.
This section provides a view of the stocks relative performances against one another. Hovering will show the values at that point in the top right. I would reccomend not going above 12 stocks in this tool, it can handle it but colours will be reused and the picture will lose clarity.
This section prints a correlation plot of your proposed portfolio. It can be useful to understand the relationships between the stocks you have chosen. High correlation may suggest over exposure to a particular industry.